package com.yeswater.multithread.chapter2.test2_1.test8;

import java.util.concurrent.TimeUnit;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class Main {

    public int i = 10;

    synchronized public void operateMainMethod() {
        i--;
        System.out.println("main print i=" + i);
        try {
            // Thread.sleep(100);
            TimeUnit.MILLISECONDS.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
